package com.special.threademo.jvm.classLoader;

import java.io.IOException;
import java.net.URL;
import java.util.Enumeration;

/**
 * Created with IDEA2020.3
 * author:LiuYC
 * DateTime:2021/1/23  17:51
 */
public class ResourceLoadDemo {
    public static void main(String[] args) throws IOException {
        ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
        String resourceName = "com/special/threademo/jvm/classLoader/PositiveUseDemo.class";
        Enumeration<URL> resources = contextClassLoader.getResources(resourceName);
        while (resources.hasMoreElements()) {
            URL url = resources.nextElement();
            System.out.println(url);
        }
    }
}
